-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS Missing Vulkan Library Fix #1215
Conversation
Hey @SRSaunders, Ive just seen your recent MacOS changes. I was seeing this issue prior to your changes and after your changes. Can you let me know your thoughts on this PR? For a bit more context this is what my CMake logs say for my Vulkan installation
Its possible on your system that you have Vulkan somewhere else? |
From PR #1177
This is likely the same issue I was running into. However, as I do not use xcode on MacOS this fix didn't work for me (but likely does for others). Changing the RPATH through CMake worked for my case which is running Vulkan Samples from the command line or through vscode's debugger. |
I have installed the Vulkan SDK at the default location (i.e. <your_home_dir>/VulkanSDK/1.3.296.0). Using the instructions below you can install either with or without the System Global Installation option - it should not matter: https://github.com/KhronosGroup/Vulkan-Samples/blob/main/docs/build.adoc#macos Note that I have updated the instructions to recommend that you always Note that I typically do not use the System Global Installation option since I often have multiple SDK versions installed at the same time for testing purposes. The above approach of sourcing setup-env.sh for the SDK version I want ensures that is the one picked up when testing. It also works when building for iOS vs. macOS (using <sdk_version>/iOS/setup-env.sh). A small detail, but if you are building/running for macOS exclusively from the command line, you technically don't have to set the variables prior to the cmake config/build steps - the project carries its own version of Vulkan headers that are used during build. The cmake log will show vulkan not found, but will continue anyways (in fact this is exactly what happens during the github CI process). In this case you only need the environment variables for running the samples. |
My main concern about your PR is that it sets the RPATH to a fixed Global Installation location ( Another side benefit of my recent PR is an undocumented feature: to allow running against local dev builds of MoltenVK. You can |
Removed myself as a reviewer. I have no Mac hardware to test this on. |
Same as Sascha: I have no Mac to test this on. |
As someone new to Vulkan on Mac, it did take some head scratching to figure out that |
I added me as a reviewer. When running in batch mode there were some samples failing and some not. Could be related to HPP. I will list the samples that are failing to start so we can check what we need to do. Normally I run using |
The docs were updated in merged PR #1177 to indicate the user should run
I have tried to fix a few of these in previous PRs. If there are any batch mode failures remaining on macOS, please let me know. There are a few that fail on iOS / iOS Sim (e.g. oit* samples) but those should be fixed in pending PR #1173. |
The samples in the performance and api categories worked fine in batch mode on my M3 Max. At least they seemed to... I didn't save the logs. the ray tracing extension isn't supported by MoltenVK so I would expect those to fail |
Just had chance to read through this. Happy with @SRSaunders documentation change. Sourcing setup-env.h works. It also looks like there is has been a change in VulkanHPP to search for Vulkan in different folders. In the next few version bumps of the Vulkan Headers this should be fixed without the need to source the env script |
Description
On newer MacOS versions the VulkanHPP loader can no longer find Vulkan due to this issue KhronosGroup/Vulkan-Hpp#1975
This PR is a temporary patch until this is officially fixed in VulkanHPP. This PR proposes adjusting the RPATH of Vulkan Samples on MacOS if vulkan is found in
/usr/local/lib
I have set this to Urgent as without this fix every sample will load with the following logs as
VulkanSample
will always use the VulkanHPP DynamicLoaderGeneral Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batch
command line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: